#ifndef TCPSERVER_H
#define TCPSERVER_H

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <QLabel>

QT_BEGIN_NAMESPACE
namespace Ui {
class TcpServer;
}
QT_END_NAMESPACE

class TcpServer : public QMainWindow
{
    Q_OBJECT

public:
    TcpServer(QWidget *parent = nullptr);
    ~TcpServer();

private slots:
    void on_pbn_set_listen_clicked();

    void on_pbn_send_data_clicked();

private:
    Ui::TcpServer *ui;

    QTcpServer *server_{ nullptr };
    QTcpSocket *tcp_{ nullptr };
    QLabel *status_{ nullptr };
};
#endif // TCPSERVER_H
